/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pl.edu.agh.student.logic.webapp;

import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
//import org.richfaces.event.UploadEvent;
import javax.ejb.Local;
import org.richfaces.event.UploadEvent;
import pl.edu.agh.student.model.Application;
import pl.edu.agh.student.model.Education;

/**
 *
 * @author janburkot
 */
@Local
public interface ApplicationBean {
    
    String create();
            
    String save(Application application);

    String delete(Application application);

    String update(Application application);

    List<Application> getAll();

    void refresh(Application application);

    Application getSelectedApplication();

    void setSelectedApplication(Application application);

    void destroy();
    
    String submit(Application application);
    
    public void paint(OutputStream stream, Object object) throws IOException;
    
    public void listener(UploadEvent event) throws Exception;
    
    Education[] getEducation();

    public void setFile(pl.edu.agh.student.model.Attachment file);

    public java.util.List<pl.edu.agh.student.model.Attachment> getFiles();

    public pl.edu.agh.student.model.Attachment getFile();

    public void setUseFlash(boolean useFlash);

    public boolean isUseFlash();

    public void setAutoUpload(boolean autoUpload);

    public boolean isAutoUpload();

    public void setUploadsAvailable(int uploadsAvailable);

    public int getUploadsAvailable();

    public int getSize();

    public void delete(pl.edu.agh.student.model.Attachment _file);

    public java.lang.String download(pl.edu.agh.student.model.Attachment _file);

    public boolean isSubmited(pl.edu.agh.student.model.Application app);

    public void validateApplication(pl.edu.agh.student.model.Application app) throws Exception;

    public boolean isOwner(pl.edu.agh.student.model.Application app);

    public String delete();
    
}
